<script>
	export default {
		globalData: {
			openId:'',
			userInfo: null,
			phoneNumber:'',
			encryptedData: '',
			iv: '',
			rawData: '',
			signature: '',
			sessionKey:'',
			series:'',//设备序列号
			loginType:'',//登录类型/app小程序
			appid: 'wxc5837e262df57c31',
			serverUrl: "https://huoshan.szhssj.com.cn/huoshanbackstage",
			baseURL: "https://miniappapi.szhssj.com.cn/api",
			returnBall: {
				"x": 100,
				"y": 100,
				"show": true
			},
			connectData: '',
			roomcode: '',
			channel: '-1',
			classifyId: -1,
			x: 0,
			y: uni.getSystemInfoSync().windowHeight,
			type: 1, //素材或场景
			olddate: '', //上一次的点击时间
			id: '', //被点击的素材或场景id
			mubuIndex:0,
			fuseClassifyLabel:'',//融合分类
			mainMubuNo:'',//主幕布号
		},
		onLaunch: function() {
			// 展示本地存储能力
			var logs = uni.getStorageSync('logs') || []
			logs.unshift(Date.now())
			uni.setStorageSync('logs', logs)
			
			
			
			//#ifdef MP-WEIXIN
			// 登录
			uni.login({
				success: res => {
					// 发送 res.code 到后台换取 openId, sessionKey, unionId
				}
			})
			//获取用户信息
			uni.getSetting({
				success: res => {
					if (res.authSetting['scope.userInfo']) {
						// 已经授权，可以直接调用 getUserInfo 获取头像昵称，不会弹框
						uni.getUserInfo({
							success: res => {
								// 可以将 res 发送给后台解码出 unionId
								this.globalData.userInfo = res.userInfo;
								this.globalData.encryptedData = res.encryptedData;
								this.globalData.iv = res.iv;
								this.globalData.rawData = res.rawData;
								this.globalData.signature = res.signature;
								// 由于 getUserInfo 是网络请求，可能会在 Page.onLoad 之后才返回
								// 所以此处加入 callback 以防止这种情况
								if (this.userInfoReadyCallback) {
									this.userInfoReadyCallback(res)
								}
							}
						})
					}
				}
			})
			//#endif 
			
			
			//#ifdef APP-PLUS
			/*
			 锁定当前屏幕为横屏正方向
			 "portrait-primary": 竖屏正方向； 
			 "portrait-secondary": 竖屏反方向，屏幕正方向按顺时针旋转180°；
			 "landscape-primary": 横屏正方向，屏幕正方向按顺时针旋转90°； 
			 "landscape-secondary": 横屏方向，屏幕正方向按顺时针旋转270°； 
			 "portrait": 竖屏正方向或反方向，根据设备重力感应器自动调整； 
			 "landscape": 横屏正方向或反方向，根据设备重力感应器自动调整；
			 */
			plus.screen.lockOrientation('portrait-primary'); //锁定
			
			if (this.globalData.userInfo == null) {
				let userInfo = uni.getStorageSync('userInfo')
				this.globalData.userInfo = userInfo;
			}
			//#endif 
		},
		onShow: function() {
			console.log('App Show')
		},
		onHide: function() {
			console.log('App Hide')
		}
	}
</script>

<style lang="scss">
	page {//页面背景色
		background-color: #313247;
	}
	
	/*每个页面公共css */
	/**app.wxss**/
	.container {
		height: 100%;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: space-between;
		padding: 200rpx 0;
		box-sizing: border-box;
	}

	/* 小图标 */
	/* @font-face {
		font-family: "iconfont";
		src: url('iconfont.eot?t=1568789913411');
		src: url('iconfont.eot?t=1568789913411#iefix') format('embedded-opentype'),
			url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAAx8AAsAAAAAFLwAAAwuAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCDfAqbJJY0ATYCJAMwCxoABCAFhG0HgQobaBEz0jDKCorsvzqwHdPTEXYl1+6CYmozT7vpsb+Fos5bQYKkqKeZQYj4OCKFwvs6+Ic/9p77opdJkbpvo4FUUgpPq8xn9oanbf67I+Uwi4EgNmXMnCJmgVGUUX/GXKQRAUZ+XTSLTGDRDRHe7jFJjVLRzITchG5et09ydbi/id05/LrtYhuQM9mqq1hYk9Yj8Lk6UnHZ+kJIgoH/zbkGbFSEepKTjx59rkvbUTLA6fdz9W+ohaIP/W1H31HTxN7MFfFElBIJScSjWqVCKByhVRI0IhZjk0NdJGk0/qLiYAgUy3ZohkQlATxHMIWoW5AnAviCiCNqJHGDY8M2ry+AkcozfB7gM/p4PZwkMHxFHOrgMVgKArpnpScNkmGfg5rlKYDWbGDBDnAtznbybwFLgzqrqNAGNNPB0MtbLOStdYBhP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i0HnKLPqQJMdH1KRr/quukZjcTzT8gFAYALc2fuZuIgoA2C/6yJ7a0QAOEzgDcWwfbeAvIFuILlBaAwWENUOChYdAFzgADghvAgscfEHxsC90cMaGcTy0DcFTPgIzaDIxh/9C6Ci5Ah4K7wJv2lhFQER8UZzHcYbWWMuMNhBMVIN6hQAlrJZ2yOPpNZm5w4DR/qT8NYykMbAZr7H0R07CMVSoWc1kwacgdpIUQtgI1jUDpIBWp6ZAPT5czmbmdVQ8SaZ3MvgFBk21fAGI7bgFFMD31JKu8/xsxZg00EH0OcP/IYFROH7AxsKbAvFg8VZ/bklhhYVws4AoNdOZAtEAIV5BGugQodc9XIcrkIH8ORyfH5GPlTss6rJ/TXuIscPH1K3ZOjJGVk1dQVFJWUVXTEOynRO5UXCqxyKYq9RyhFLmdIzF2udkqZoVlUNrg7k/FDKacNZHKyldsmqRsno84BT9eCjh5QscBAA==') format('woff2'),
			url('iconfont.woff?t=1568789913411') format('woff'),
			url('iconfont.ttf?t=1568789913411') format('truetype'),
			url('iconfont.svg?t=1568789913411#iconfont') format('svg');
	} */

	.iconfont {
		font-family: "iconfont" !important;
		font-size: 16px;
		font-style: normal;
		-webkit-font-smoothing: antialiased;
		-moz-osx-font-smoothing: grayscale;
	}

	.icon-jianpan:before {
		content: "\e608";
	}

	.icon-changjing:before {
		content: "\e600";
	}

	.icon-danmu:before {
		content: "\e601";
	}

	.icon-baping:before {
		content: "\e602";
	}

	.icon-sucai:before {
		content: "\e603";
	}

	page {
		font-size: 26rpx;
		color: #666;
	}

	.flex {
		display: -webkit-flex;
		display: flex;
		width: 100%;
		align-items: center;
	}

	/*  底部悬浮导航  */
	.fix_nav_wp {
		height: 66px;
		position: fixed;
		left: 0;
		bottom: 0;
		background: #3A3A52;
		z-index: 10
	}

	.fix_nav_wp .nav_link {
		flex: 1;
	}

	.fix_nav_wp button {
		height: 66px;
		display: flex;
		justify-content: space-between;
		align-items: center;
		padding: 0;
		font-size: 22rpx;
		flex-direction: column;
		color: #999;
		position: relative;
	}

	.fix_nav_wp .tip_tip {
		position: absolute;
		right: 25rpx;
		top: 5rpx;
		min-width: 28rpx;
		line-height: 32rpx;
		height: 32rpx;
		padding: 0 8rpx;
		color: #fff;
		background: #f00;
		border-radius: 50em;
		border: 1rpx solid #fff;
	}

	.fix_nav_wp .nav_link .iconfont {
		height: 60rpx;
		font-size: 56rpx;
		line-height: 80rpx;
		color: #ffffff;
	}

	.fix_nav_wp .nav_link .plus_wp {
		width: 120rpx;
		height: 120rpx;
		margin-top: -45rpx;
	}

	.fix_nav_wp .nav_link image {
		width: 120rpx;
		height: 120rpx;
	}

	.fix_nav_wp .nav_link .txt {
		height: 50rpx;
		line-height: 40rpx;
		color: #ffffff;
	}

	.fix_nav_wp .nav_link.current .txt {
		color: #00a2e9;
	}

	.fix_nav_wp .nav_link .del_ico {
		display: block;
	}

	.fix_nav_wp .nav_link .cur_ico {
		display: none;
	}

	.fix_nav_wp .nav_link.current .del_ico {
		display: none;
	}

	.fix_nav_wp .nav_link.current .cur_ico {
		display: block;
		color: #00a2e9;
	}

	.fix_nav_wp .nav_link .txt_fb {
		line-height: 18rpx
	}

	.fix_nav_wp .nav_link .mp_ico {
		font-size: 50rpx;
		line-height: 80rpx
	}

	.fix_nav_wp .nav_link .xiaox_ico {
		font-size: 64rpx;
		line-height: 70rpx;
	}

	.fix_nav_wp .nav_link .my_ico {
		font-size: 56rpx;
	}

	.fix_nav_wp .on_cor .del_ico,
	.fix_nav_wp .on_cor .txt {
		color: #FFE570
	}

	/* 清楚按钮的默认样式  */
	.defalut_btn {
		background: transparent;
		border: none;
		overflow: visible;
		padding-left: 0;
		padding-right: 0;
		margin-left: 0;
		margin-right: 0;
		border-radius: 0;
	}

	.defalut_btn:after {
		display: none;
	}

	.text-primary {
		color: #00a2e9;
	}
</style>
